/**
 * @author Philipp Hannemann & Christoph Lehnert
 */

package org.bonn.ooka;

import java.io.FileNotFoundException;
import java.io.PrintStream;

import org.bonn.ooka.core.CommandLine;
import org.bonn.ooka.core.ComponentAssemblerUser;
import org.bonn.ooka.core.ComponentRuntimeEnvironment;


public class TestClient {

	public static void main(String[] args) throws FileNotFoundException {
		printHelp(System.out);
		
		CommandLine con = new CommandLine(System.in);
		//con = new CommandLine(new FileInputStream(new File("ding.txt")));
		
		ComponentAssemblerUser user = new ComponentAssemblerUser(new ComponentRuntimeEnvironment());
		
		while ( user.isRunning() ) {
			String line = con.readline();
			
			user.parse(line);
		}
	}

	private static void printHelp(PrintStream out) {
		out.println("######################################");
		out.println(" Help ");
		out.println("+start");
		out.println("+stop");
		out.println("");
		out.println("+status");
		out.println("");
		out.println("+deploy \"path_to_jar\" \"class_name\"");
		out.println("+exec \"id\" parameters...");
		out.println("+kill \"id\"");
		out.println("+erase \"id\"");
		out.println("######################################");
	}
}

